package com.ncepu.clubmanagement.utils.fileNameGenerateUtilsImpl;

import com.ncepu.clubmanagement.utils.FileNameGenerateUtils;
import org.springframework.stereotype.Component;

import java.util.UUID;

@Component
public class Namegenerator implements FileNameGenerateUtils {

    @Override
    public String generateFileName(String originalFilename) {
        // 避免文件名称覆盖(UUID技术)
        String objectName = UUID.randomUUID().toString() + originalFilename;
        return objectName;
    }

}
